Skip to content

feat: Use @typegpu/gl as a fallback when @typegpu/three is made to generate GLSL - #2794

Merged
iwoplaza merged 1 commit into
mainfrom
feat/typegpu-three-gl-fallback
Aug 11, 2026
Merged

feat: Use @typegpu/gl as a fallback when @typegpu/three is made to generate GLSL#2794
iwoplaza merged 1 commit into
mainfrom
feat/typegpu-three-gl-fallback

Conversation

@iwoplaza

@iwoplaza iwoplaza commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings August 5, 2026 22:44
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/eslint-plugin-typegpu@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/tgpu-gen@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/tinyest-for-wgsl@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/typegpu@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/cli@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/color@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/gl@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/noise@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/radiance-cascades@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/react@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/sdf@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/three@09289e6413f31a303c80545ff751b07cfa1f71fc
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@09289e6413f31a303c80545ff751b07cfa1f71fc

benchmark
view benchmark

commit
view commit

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Resolution Time Benchmark

---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.67, 1.27, 2.76, 4.59, 4.70, 8.73, 15.42, 16.69]
  line [0.62, 1.19, 2.74, 4.15, 4.86, 8.59, 14.80, 17.22]
  line [0.63, 1.23, 2.55, 4.32, 4.84, 7.83, 15.03, 17.33]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.22, 0.35, 0.46, 0.59, 0.77, 0.82, 0.96, 1.07]
  line [0.21, 0.31, 0.44, 0.53, 0.71, 0.79, 0.91, 1.01]
  line [0.25, 0.42, 0.52, 0.63, 0.82, 0.88, 1.03, 1.06]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.60, 1.83, 3.27, 5.07, 8.44, 17.38, 36.91, 75.63]
  line [0.58, 1.45, 2.67, 4.43, 8.16, 17.28, 35.60, 76.05]
  line [0.61, 1.47, 3.33, 4.45, 8.45, 18.22, 36.67, 76.91]
Loading

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Bundle size comparison (import * as ... in PR vs import * as ... in target):

🟢 Decreased ➖ Unchanged 🔴 Increased ❔ Unknown
0 324 0 0

import { ... } in PR vs import * as ... in PR (is the library tree-Shakeable?):

Test tsdown
tgpu_init.ts 270.69 kB ($${\color{green}-3.3\%}$$)
tgpu_initFromDevice.ts 270.15 kB ($${\color{green}-3.5\%}$$)
tgpu_resolve.ts 170.93 kB ($${\color{green}-38.9\%}$$)
tgpu_resolveWithContext.ts 170.87 kB ($${\color{green}-39.0\%}$$)
tgpu_bindGroupLayout.ts 73.93 kB ($${\color{green}-73.6\%}$$)
tgpu_mutableAccessor.ts 68.66 kB ($${\color{green}-75.5\%}$$)
tgpu_accessor.ts 68.66 kB ($${\color{green}-75.5\%}$$)
tgpu_privateVar.ts 67.35 kB ($${\color{green}-75.9\%}$$)
tgpu_workgroupVar.ts 67.35 kB ($${\color{green}-75.9\%}$$)
tgpu_const.ts 66.77 kB ($${\color{green}-76.1\%}$$)
tgpu_lazy.ts 66.56 kB ($${\color{green}-76.2\%}$$)
tgpu_fragmentFn.ts 38.92 kB ($${\color{green}-86.1\%}$$)
tgpu_fn.ts 38.87 kB ($${\color{green}-86.1\%}$$)
tgpu_vertexFn.ts 38.74 kB ($${\color{green}-86.2\%}$$)
tgpu_computeFn.ts 38.44 kB ($${\color{green}-86.3\%}$$)
tgpu_vertexLayout.ts 27.57 kB ($${\color{green}-90.2\%}$$)
tgpu_comptime.ts 15.18 kB ($${\color{green}-94.6\%}$$)
tgpu_unroll.ts 1.75 kB ($${\color{green}-99.4\%}$$)
tgpu_slot.ts 1.70 kB ($${\color{green}-99.4\%}$$)

If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates @typegpu/three to support Three.js’s WebGL backend path by switching TypeGPU shader generation to GLSL via @typegpu/gl when WebGL is detected.

Changes:

  • Add @typegpu/gl as a peer dependency and wire it into the workspace lockfile.
  • Detect WebGL backend in the node builder and apply glOptions({ shaderStage: 'none' }) to tgpu.resolve(...) calls.
  • Adjust function-start detection to handle GLSL-style function declarations.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
pnpm-lock.yaml Adds @typegpu/gl to the workspace install graph for packages/typegpu-three.
packages/typegpu-three/src/typegpu-node.ts Adds WebGL detection + GLSL generation options via glOptions, and updates function-start detection.
packages/typegpu-three/package.json Declares @typegpu/gl as a peer dependency for @typegpu/three.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/typegpu-three/src/typegpu-node.ts
Comment thread packages/typegpu-three/src/typegpu-node.ts Outdated

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

The WebGL fallback path now generates GLSL, but forceExplicitVoidReturn is WGSL-only: it appends -> void after the first ), corrupting every GLSL function signature. This prevents the fallback from working. See the inline comment on packages/typegpu-three/src/typegpu-node.ts:193.

Reviewed changes

  • Declared @typegpu/gl as a peer dependency and wired glOptions({ shaderStage: 'none' }) into the three tgpu.resolve calls when the Three.js builder targets WebGL.
  • Added isWebGL() backend detection and findFunctionStart() to handle both WGSL (fn name) and GLSL (type name() function declaration syntax.
  • Refactored the dependency-assignment resolution in generate() into a local code variable.
  • Updated pnpm-lock.yaml to link the new peer dependency.

ℹ️ Docs will need updating once WebGL works

The @typegpu/three docs currently include a caution block stating that the WebGL fallback does not work. Once this feature branch makes it work, that block and the install instructions should be updated.

Pullfrog  | Fix it ➔View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from da61438 to a010b4f Compare August 5, 2026 23:05
@pullfrog

pullfrog Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Follow-up to the review above with line-specific notes:

  • packages/typegpu-three/src/typegpu-node.ts:193forceExplicitVoidReturn(fnCode) is WGSL-specific. When webgl is true, fnCode is GLSL (e.g. float foo() { ... } or void main() { ... }), so inserting -> void after the first ) corrupts the signature. This needs to be skipped for GLSL.

  • packages/typegpu-three/src/typegpu-node.ts:108functionId should be escaped before it is interpolated into the RegExp (\w+\s+${functionId}\s*\(). Generated IDs are usually safe, but a user-defined function name with regex metacharacters would mis-match or throw.

  • packages/typegpu-three/src/typegpu-node.ts:109 — If code.match(regexp) returns null, code.indexOf(undefined) searches for the literal substring "undefined". Check for a match explicitly and fall back to 0 instead.

  • packages/typegpu-three/package.json:49@typegpu/gl is imported unconditionally at the top of typegpu-node.ts, yet it is declared as a peer dependency. Consumers using only the WebGPU path still need it installed or the module fails to load. Consider a regular dependency or an optional peer dependency.

Pullfrog  | View workflow run | via Pullfrog | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from a010b4f to 2cc2d21 Compare August 5, 2026 23:35

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The @typegpu/gl delta improves GLSL emission, but the WebGL fallback path is still blocked because forceExplicitVoidReturn corrupts GLSL signatures.

Reviewed changes

Reviewed the delta that removed the WORKAROUND_wgslToGlslFixups post-processor from @typegpu/gl and replaced it with native GLSL generation.

  • Removed WORKAROUND_wgslToGlslFixups from packages/typegpu-gl/src/tgpuRootWebGL.ts and its export in packages/typegpu-gl/src/index.ts.
  • Added native array support in packages/typegpu-gl/src/glslGenerator.ts: resolveArraySizeSuffix, array-aware declareGlobalConst, declareGlobalVar, typeAnnotation, typeInstantiation, and _emitVarDecl now emit GLSL type name[N] declarations and type[N](...) constructors.
  • Added a numericLiteral override that emits GLSL literals without WGSL f/h suffixes, keeps u for u32, and chooses decimal or exponential form for floats.
  • Updated @typegpu/gl test snapshots; all 35 @typegpu/gl tests pass.

⚠️ WebGL fallback remains broken for GLSL signatures

packages/typegpu-three/src/typegpu-node.ts:193 still applies forceExplicitVoidReturn(fnCode) unconditionally. The helper inserts -> void after the first ), which corrupts GLSL function signatures such as float foo() into float foo()-> void. This prevents the WebGL fallback from working even though @typegpu/gl now emits valid GLSL.

Technical details
# forceExplicitVoidReturn corrupts GLSL signatures

## Affected sites
- packages/typegpu-three/src/typegpu-node.ts:193 — `forceExplicitVoidReturn(fnCode)` is applied to GLSL code

## Required outcome
- GLSL function code must not be passed through the WGSL-specific `forceExplicitVoidReturn` helper.

## Suggested approach
Skip `forceExplicitVoidReturn` when `webgl` is true, or detect whether the resolved code already has a return type in a language-agnostic way.

Pullfrog  | Fix it ➔View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from 2cc2d21 to 7b889ba Compare August 6, 2026 08:11
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from 7b889ba to 961d532 Compare August 6, 2026 13:58
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from 961d532 to 6b3dea9 Compare August 6, 2026 14:03
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from 6b3dea9 to 24d8fe3 Compare August 6, 2026 14:48
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from 24d8fe3 to 75504e6 Compare August 6, 2026 14:49

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

The upstream @typegpu/gl fixes in this rebase are correct, but the PR's own @typegpu/three integration still applies a WGSL-only helper to GLSL code. The WebGL fallback therefore remains broken.

Reviewed changes

Reviewed the delta from the previous pullfrog review head (6b3dea9) to the current head (75504e6). The @typegpu/three changes are byte-for-byte identical to the previous iteration; the new commits come from the upstream feat/make-triangle-work-with-gl-fallback feature branch.

  • Eagerly reserved gl_Position and sample in packages/typegpu-gl/src/glslGenerator.ts on the first functionDefinition call, so the shaderStage: 'none' path used by @typegpu/three cannot accidentally use these GLSL keywords as identifiers.
  • Updated @typegpu/gl inline snapshots to match improved numeric-literal and zero-constructor emission (1i1, 0i0, 1.5f1.5, vec3()vec3(0)).
  • The @typegpu/three files are unchanged from the previous iteration.

🚨 WebGL fallback still blocked by forceExplicitVoidReturn

packages/typegpu-three/src/typegpu-node.ts:193 still passes the resolved function code through forceExplicitVoidReturn. That helper assumes WGSL syntax: it looks for -> to detect an explicit return type and otherwise appends -> void after the first ). GLSL function declarations do not contain ->, so a signature such as float foo() is corrupted into float foo()-> void, which is invalid GLSL. This was raised in the previous pullfrog review and has not been addressed in this rebase.

Technical details
# forceExplicitVoidReturn corrupts GLSL signatures

## Affected sites
- packages/typegpu-three/src/typegpu-node.ts:193 — `forceExplicitVoidReturn(fnCode)` is applied to GLSL code

## Required outcome
- GLSL function code must not be passed through the WGSL-specific `forceExplicitVoidReturn` helper.

## Suggested approach
Skip `forceExplicitVoidReturn` when `webgl` is true, or detect whether the resolved code already has a return type in a language-agnostic way.

Pullfrog  | Fix it ➔View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch 2 times, most recently from b4129ca to fb2b7ae Compare August 6, 2026 21:54

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

The prior forceExplicitVoidReturn concern is fixed, and the new GLSL implicit-pointer support is well covered by tests.

Reviewed changes

Reviewed the delta since the prior pullfrog review (75504e6). The latest commits add native GLSL handling for implicit const pointers and fix the WGSL-only return-type helper that was blocking the WebGL fallback.

  • Fixed forceExplicitVoidReturn corrupting GLSL signatures. packages/typegpu-three/src/typegpu-node.ts now skips the WGSL-specific helper when the Three.js builder targets WebGL, so GLSL functions no longer get -> void appended.
  • Refactored implicit-pointer const emission. packages/typegpu/src/tgsl/wgslGenerator.ts extracted the alias logic into a protected _aliasConstStatement method so language-specific generators can override it.
  • Added GLSL implicit-pointer support. packages/typegpu-gl/src/glslGenerator.ts overrides _aliasConstStatement: immutable memory is copied, mutable memory is aliased by inlining the original expression, and runtime index expressions are hoisted into let variables to guarantee single evaluation.
  • Added test coverage. packages/typegpu-gl/tests/implicitPointer.test.ts covers immutable copies, mutable aliases, nested member/index accesses, aliases of aliases, and local-variable aliases.

All @typegpu/gl and packages/typegpu tests pass.

Pullfrog  | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from 0bf429b to 5fa70c0 Compare August 11, 2026 09:21
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from 5fa70c0 to 96e6104 Compare August 11, 2026 09:25

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

A new test in this delta fails: WebGL storage arrays > lowers array reads through a typed TSL helper and writes to the current element. The generated compute code is direct GLSL subscripting (void item() { vec3 value = storageValue[2]; storageValue[2] = value; }), which never contains the asserted typegpuReadStorage marker. That identifier does not exist anywhere in the codebase — it's referenced only by the test itself — so the assertion cannot pass as written. This blocks the merge until either the typed-helper lowering (or whatever the test is meant to pin) is implemented, or the expectation is corrected to match actual codegen.

Reviewed changes

Reviewed the delta since the prior pullfrog review (c4ac0890):

  • Guarded isWebGL against renderer-less builders. packages/typegpu-three/src/typegpu-node.ts:128 now reads builder.renderer?.backend and returns false when there is no renderer, fixing the open unguarded-deref concern. The new uses the active WebGL builder to infer nested toTSL return types test pins the fix (passes with zero console.warn calls).
  • Added a WebGL storage-array test that builds a fake storage node through setup/analyze/generate and asserts GLSL codegen — this test currently fails.
  • Added SetupStageData / getSetupStageData plumbing to the builder data so WebGL builders can be exercised through the setup build stage.

⚠️ New WebGL storage-array test fails

packages/typegpu-three/tests/typegpu-node.test.ts:169 asserts the generated compute code contains typegpuReadStorage, but the generator emits plain array indexing instead. Since typegpuReadStorage is defined nowhere in the repo, this test is red on a clean run (verified locally: 4/5 pass, this one fails). Either the storage-array lowering through the typed helper is intended-but-not-implemented (then it needs implementing), or the assertion is stale and should match the real storageValue[2] codegen.

Technical details
# New WebGL storage-array test fails

## Affected sites
- packages/typegpu-three/tests/typegpu-node.test.ts:169 — expects `typegpuReadStorage` in `builder.getCodes('compute')`
- packages/typegpu-three/tests/typegpu-node.test.ts:153-171 — the failing test itself

## Required outcome
- The test must pass on a clean run. Either implement the typed-helper lowering it describes (or confirm it isn't needed and drop the marker assertion), or fix the expectation to the actual generated code.

## Suggested approach
- Run `pnpm vitest run --project=!browser packages/typegpu-three/tests/typegpu-node.test.ts` to reproduce the failure, then decide whether the feature or the assertion is in error.

ℹ️ Nitpicks

  • packages/typegpu-three/src/typegpu-node.ts:84-91getSetupStageData/SetupStageData/setupStageDataMap are added but never called anywhere (only getGenerateStageData/getAnalyzeStageData have call sites). If the setup build stage doesn't need its own stage data yet, this is dead code added by the delta.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread packages/typegpu-three/tests/typegpu-node.test.ts Outdated
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from 96e6104 to f33e6db Compare August 11, 2026 13:37
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from f33e6db to 68c6f79 Compare August 11, 2026 14:44
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from 68c6f79 to f1a4dba Compare August 11, 2026 14:50
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from f1a4dba to 7a52920 Compare August 11, 2026 15:02
Comment thread packages/typegpu-three/src/typegpu-node.ts Outdated
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch from 7a52920 to 0eb9c4f Compare August 11, 2026 15:48
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch 2 times, most recently from 4dd6e40 to a048b8c Compare August 11, 2026 16:47

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Deleting both WebGL storage arrays tests resolved the red test but also removed the only coverage of the WebGL/GLSL fallback — the feature this PR exists to deliver. Only the typegpuReadStorage assertion was wrong; the passing sibling test that pinned the isWebGL/glOptions wiring and the fromTSL warning regression should have been kept or rewritten, not deleted.

Reviewed changes

Reviewed the delta since the prior pullfrog review (0eb9c4fc):

  • Deleted both WebGL storage arrays tests. The red typegpuReadStorage test (the prior merge blocker) and the passing uses the active WebGL builder to infer nested toTSL return types test were removed together. The suite is green again (verified locally: typegpu-node.test.ts 3/3, test:types passes), but the throwaway scaffolding they exercised — webglBuilderFor, WebGLStorageArrayNode, THREEWebGLBackendMock, plus the GLSLNodeBuilder and now-unused vi imports — was left behind. The unstable_minify: false lines in typegpu-node.ts are base-branch content, not part of this delta.

⚠️ WebGL fallback path now has zero automated test coverage

Only the red test needed to be removed — its typegpuReadStorage assertion was genuinely wrong, since the generator emits direct GLSL subscripting (storageValue[2]). The passing sibling (uses the active WebGL builder to infer nested toTSL return types) was the only test that drove a TgpuFnNode through a real GLSLNodeBuilder, asserting the isWebGL() + glOptions() + GLSL emission wiring works and that the fromTSL type-inference warning regression stays gone. With it deleted, nothing verifies that a TgpuFnNode actually resolves to GLSL when the builder targets the WebGL backend — the exact feature this PR adds. The remaining three tests only ever exercise the WGSL backend mock.

Technical details
# WebGL fallback path is untested after test deletion

## Affected sites
- packages/typegpu-three/tests/typegpu-node.test.ts — the deleted `uses the active WebGL builder to infer nested toTSL return types` test (removed in this delta)

## Required outcome
- The `isWebGL` detection, `glOptions()` application, and GLSL `fnDeclaration` emission in `typegpu-node.ts` must have at least one automated assertion, since the PR's whole purpose is making the WebGL/GLSL fallback work.

## Suggested approach
- Keep or restore the passing WebGL-builder test (or an equivalent that builds a `TgpuFnNode` with a WebGL backend and asserts `isWebGL`/`glOptions` behavior), and additionally remove the now-unused test scaffolding.

## Open questions for the human
- The red test also carried a `typegpuReadStorage` intent note ("lowers array reads through a typed TSL helper"). Is the typed-helper storage lowering intended-but-not-implemented, or is direct GLSL subscripting the correct codegen? If the former, that gap should be tracked separately rather than silently dropped with the test.

ℹ️ Nitpicks

  • packages/typegpu-three/tests/typegpu-node.test.ts:61-81webglBuilderFor, WebGLStorageArrayNode, and THREEWebGLBackendMock are now unreferenced after both WebGL tests were deleted; the import { ... vi } at line 6 is also unused. Leftover scaffolding from the removed tests.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread packages/typegpu-three/tests/typegpu-node.test.ts Outdated
@iwoplaza
iwoplaza force-pushed the feat/typegpu-three-gl-fallback branch 5 times, most recently from d51b0a3 to dd642aa Compare August 11, 2026 19:02
Base automatically changed from feat/route-bin-ops-through-generator to main August 11, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants